<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\Database\Migrations\Migration;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Schema\Schema;

class UpdateA02ConfigTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('user_account', function (Blueprint $table) {
            //
            $table->bigInteger('id');
            $table->bigInteger('user_id')->index()->comment('用户ID');
            $table->string('api_key')->comment('APIKEY');
            $table->string('secret_key')->comment('密钥');
            $table->dateTime('created_at')->comment('创建时间');
            $table->dateTime('updated_at')->nullable(true)->comment('编辑时间');
            $table->comment('用户账户');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('user_account', function (Blueprint $table) {});
    }
}
